using System;
using System.Runtime.CompilerServices;
using System.Threading;

namespace yWriter6
{
	public class clsScenesEditor
	{
		public delegate void FinishedEditEventHandler(int ScID);

		public delegate void EditDifferentSceneEventHandler(int NewScID, int WhichTab, string SearchString);

		public delegate void CreateSceneEventHandler(int BelongsToChID, int InsertBeforeScID, int InsertAfterScID);

		[CompilerGenerated]
		private FinishedEditEventHandler FinishedEditEvent;

		[CompilerGenerated]
		private EditDifferentSceneEventHandler EditDifferentSceneEvent;

		[CompilerGenerated]
		private CreateSceneEventHandler CreateSceneEvent;

		public event FinishedEditEventHandler FinishedEdit
		{
			[CompilerGenerated]
			add
			{
				FinishedEditEventHandler finishedEditEventHandler = FinishedEditEvent;
				FinishedEditEventHandler finishedEditEventHandler2;
				do
				{
					finishedEditEventHandler2 = finishedEditEventHandler;
					FinishedEditEventHandler value2 = (FinishedEditEventHandler)Delegate.Combine(finishedEditEventHandler2, value);
					finishedEditEventHandler = Interlocked.CompareExchange(ref FinishedEditEvent, value2, finishedEditEventHandler2);
				}
				while ((object)finishedEditEventHandler != finishedEditEventHandler2);
			}
			[CompilerGenerated]
			remove
			{
				FinishedEditEventHandler finishedEditEventHandler = FinishedEditEvent;
				FinishedEditEventHandler finishedEditEventHandler2;
				do
				{
					finishedEditEventHandler2 = finishedEditEventHandler;
					FinishedEditEventHandler value2 = (FinishedEditEventHandler)Delegate.Remove(finishedEditEventHandler2, value);
					finishedEditEventHandler = Interlocked.CompareExchange(ref FinishedEditEvent, value2, finishedEditEventHandler2);
				}
				while ((object)finishedEditEventHandler != finishedEditEventHandler2);
			}
		}

		public event EditDifferentSceneEventHandler EditDifferentScene
		{
			[CompilerGenerated]
			add
			{
				EditDifferentSceneEventHandler editDifferentSceneEventHandler = EditDifferentSceneEvent;
				EditDifferentSceneEventHandler editDifferentSceneEventHandler2;
				do
				{
					editDifferentSceneEventHandler2 = editDifferentSceneEventHandler;
					EditDifferentSceneEventHandler value2 = (EditDifferentSceneEventHandler)Delegate.Combine(editDifferentSceneEventHandler2, value);
					editDifferentSceneEventHandler = Interlocked.CompareExchange(ref EditDifferentSceneEvent, value2, editDifferentSceneEventHandler2);
				}
				while ((object)editDifferentSceneEventHandler != editDifferentSceneEventHandler2);
			}
			[CompilerGenerated]
			remove
			{
				EditDifferentSceneEventHandler editDifferentSceneEventHandler = EditDifferentSceneEvent;
				EditDifferentSceneEventHandler editDifferentSceneEventHandler2;
				do
				{
					editDifferentSceneEventHandler2 = editDifferentSceneEventHandler;
					EditDifferentSceneEventHandler value2 = (EditDifferentSceneEventHandler)Delegate.Remove(editDifferentSceneEventHandler2, value);
					editDifferentSceneEventHandler = Interlocked.CompareExchange(ref EditDifferentSceneEvent, value2, editDifferentSceneEventHandler2);
				}
				while ((object)editDifferentSceneEventHandler != editDifferentSceneEventHandler2);
			}
		}

		public event CreateSceneEventHandler CreateScene
		{
			[CompilerGenerated]
			add
			{
				CreateSceneEventHandler createSceneEventHandler = CreateSceneEvent;
				CreateSceneEventHandler createSceneEventHandler2;
				do
				{
					createSceneEventHandler2 = createSceneEventHandler;
					CreateSceneEventHandler value2 = (CreateSceneEventHandler)Delegate.Combine(createSceneEventHandler2, value);
					createSceneEventHandler = Interlocked.CompareExchange(ref CreateSceneEvent, value2, createSceneEventHandler2);
				}
				while ((object)createSceneEventHandler != createSceneEventHandler2);
			}
			[CompilerGenerated]
			remove
			{
				CreateSceneEventHandler createSceneEventHandler = CreateSceneEvent;
				CreateSceneEventHandler createSceneEventHandler2;
				do
				{
					createSceneEventHandler2 = createSceneEventHandler;
					CreateSceneEventHandler value2 = (CreateSceneEventHandler)Delegate.Remove(createSceneEventHandler2, value);
					createSceneEventHandler = Interlocked.CompareExchange(ref CreateSceneEvent, value2, createSceneEventHandler2);
				}
				while ((object)createSceneEventHandler != createSceneEventHandler2);
			}
		}
	}
}
